package com.bionic.CES.beans;

import java.io.Serializable;

public class Bankacc implements Serializable {

    private Integer id;
    private Integer accNum;
    private String currency;
    private String bankName;
    private String swift;
    private String correspondentBank;
    private Integer userId;
    
    public Bankacc() {
    }

    public Bankacc(Integer accNum, String currency, String bankName, String swift, String correspondentBank, Integer userId) {
        this.accNum = accNum;
        this.currency = currency;
        this.bankName = bankName;
        this.swift = swift;
        this.correspondentBank = correspondentBank;
        this.userId=userId;
    }

    public Integer getAccNum() {
        return accNum;
    }

    public void setAccNum(int accNum) {
        this.setAccNum((Integer) accNum);
    }

    public String getCurrency() {
        return currency;
    }

    public void setCurrency(String currency) {
        this.currency = currency;
    }

    public String getBankName() {
        return bankName;
    }

    public void setBankName(String bankName) {
        this.bankName = bankName;
    }

    public String getSwift() {
        return swift;
    }

    public void setSwift(String swift) {
        this.swift = swift;
    }

    public String getCorrespondentBank() {
        return correspondentBank;
    }

    public void setCorrespondentBank(String correspondentBank) {
        this.correspondentBank = correspondentBank;
    }

   
    public Integer getUserId() {
        return userId;
    }

   
    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    @Override
    public String toString() {
        return "Bankacc [accNum=" + getAccNum() + ", bankName=" + getBankName()
                + ", swift=" + getSwift() + ", correspondentBank="
                + getCorrespondentBank() + ", currency=" + getCurrency() + ", userId=" + getUserId() + "]";
    }

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + getAccNum();
		result = prime * result
				+ ((getBankName() == null) ? 0 : getBankName().hashCode());
		result = prime
				* result
				+ ((getCorrespondentBank() == null) ? 0 : getCorrespondentBank()
						.hashCode());
		result = prime * result
				+ ((getCurrency() == null) ? 0 : getCurrency().hashCode());
		result = prime * result + ((getSwift() == null) ? 0 : getSwift().hashCode());
		result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (!(obj instanceof Bankacc))
			return false;
		Bankacc other = (Bankacc) obj;
		if (getAccNum() != other.getAccNum())
			return false;
		if (getBankName() == null) {
			if (other.getBankName() != null)
				return false;
		} else if (!bankName.equals(other.bankName))
			return false;
		if (getCorrespondentBank() == null) {
			if (other.getCorrespondentBank() != null)
				return false;
		} else if (!correspondentBank.equals(other.correspondentBank))
			return false;
		if (getCurrency() == null) {
			if (other.getCurrency() != null)
				return false;
		} else if (!currency.equals(other.currency))
			return false;
		if (getSwift() == null) {
			if (other.getSwift() != null)
				return false;
		} else if (!swift.equals(other.swift))
			return false;
		if (getUserId() == null) {
			if (other.getUserId() != null)
				return false;
		} else if (!userId.equals(other.userId))
			return false;
		return true;
	}

    /**
     * @return the id
     */
    public Integer getId() {
        return id;
    }

    /**
     * @param id the id to set
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * @param accNum the accNum to set
     */
    public void setAccNum(Integer accNum) {
        this.accNum = accNum;
    }

	
}
